home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / xarchie-2.0.9 / m-file-panel.c < prev    next >
C/C++ Source or Header  |  1995-06-18  |  1KB  |  59 lines

  1. /*
  2.  * m-file-panel.c : Save-load-write menu routines
  3.  *
  4.  * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
  5.  */
  6.  
  7. #include <X11/Intrinsic.h>
  8. #include <X11/Xaw/SimpleMenu.h>
  9. #include <X11/Xaw/SmeBSB.h>
  10. #include <X11/StringDefs.h>
  11. #include "menu.h"
  12. #include "appres.h"
  13. #include "file-panel.h"
  14.  
  15. /*
  16.  * Functions defined here:
  17.  */
  18. void initFilePanelMenu();
  19. static void fileWriteModeMenuCallback();
  20.  
  21. /*
  22.  * Data defined here:
  23.  */
  24. static Widget fileWriteModeMenu;
  25. static SmeBSBObject fileWriteModeMenuItems[2];
  26.  
  27. static Boolean fileWriteModeValues [] = {
  28.     True, False
  29. };
  30.  
  31. /*    -    -    -    -    -    -    -    -    */
  32.  
  33. void
  34. initFilePanelMenu()
  35. {
  36.     fileWriteModeMenu = createMenu("filePanelWriteModeMenu",
  37.                    "filePanelWriteModeMenuItem",2,
  38.                    fileWriteModeMenuItems,
  39.                    fileWriteModeMenuCallback);
  40. }
  41.  
  42. /*    -    -    -    -    -    -    -    -    */
  43. /* Callback procedures */
  44.  
  45. /*ARGSUSED*/
  46. static void
  47. fileWriteModeMenuCallback(w,client_data,call_data)
  48. Widget w;
  49. XtPointer client_data;    /* item */
  50. XtPointer call_data;    /* ignored */
  51. {
  52.     int item = (int)client_data;
  53.  
  54.     setIthItemMark(fileWriteModeMenuItems,item,
  55.            XtNumber(fileWriteModeMenuItems));
  56.     appResources.fileWriteOnePerLine = fileWriteModeValues[item];
  57.     updateFileWriteMode(appResources.fileWriteOnePerLine);
  58. }
  59.